/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package rssclient;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author jpareyes
 */
@Entity
@Table(name = "FUENTE")
@XmlRootElement
@NamedQueries({
        @NamedQuery(name = "Fuente.findAll", query = "SELECT f FROM Fuente f"),
        @NamedQuery(name = "Fuente.findByCodFuente", query = "SELECT f FROM Fuente f WHERE f.codFuente = :codFuente"),
        @NamedQuery(name = "Fuente.findByUrlFuente", query = "SELECT f FROM Fuente f WHERE f.urlFuente = :urlFuente")})
public class Fuente implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @Basic(optional = false)
        @Column(name = "COD_FUENTE")
        private String codFuente;
        @Column(name = "URL_FUENTE")
        private String urlFuente;

        public Fuente() {
        }

        public Fuente(String codFuente) {
                this.codFuente = codFuente;
        }

        public String getCodFuente() {
                return codFuente;
        }

        public void setCodFuente(String codFuente) {
                this.codFuente = codFuente;
        }

        public String getUrlFuente() {
                return urlFuente;
        }

        public void setUrlFuente(String urlFuente) {
                this.urlFuente = urlFuente;
        }

        @Override
        public int hashCode() {
                int hash = 0;
                hash += (codFuente != null ? codFuente.hashCode() : 0);
                return hash;
        }

        @Override
        public boolean equals(Object object) {
                // TODO: Warning - this method won't work in the case the id fields are not set
                if (!(object instanceof Fuente)) {
                        return false;
                }
                Fuente other = (Fuente) object;
                if ((this.codFuente == null && other.codFuente != null) || (this.codFuente != null && !this.codFuente.equals(other.codFuente))) {
                        return false;
                }
                return true;
        }

        @Override
        public String toString() {
                return "rssclient.Fuente[ codFuente=" + codFuente + " ]";
        }
        
}
